package com.cqeec.demo2.demos.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

//随机值获取
@Controller

public class TestController {
@Value("${my.name}")
    private String name;
@Value("${my.name}")
    private int id;
@RequestMapping("/test1")
@ResponseBody
public String aa(){
    return  name+id;
}
}
